home *** CD-ROM | disk | FTP | other *** search
- '***********************************************
- '* Virtual Guitar Demo for "Computer Life" *
- '***********************************************
-
- '$INCLUDE 'setupapi.inc'
- '$INCLUDE 'vmmsdet.inc'
- '$INCLUDE 'vminsapi.inc'
-
- ''Dialog ID's
- CONST DLG_WELCOME% = 100
- CONST DLG_INSTPATH% = 110
- CONST DLG_ALREADYINSTALLED% = 140
- CONST DLG_DIRNOTFOUND% = 160
- CONST DLG_NEED486% = 180
- CONST DLG_NEEDWIN31% = 190
- CONST DLG_NEEDENHANCED% = 200
- CONST DLG_NEED4MEG% = 210
- CONST DLG_NEED5MBDISKSPACE% = 220
- CONST DLG_NEEDVFW11% = 260
- CONST DLG_REALLYEXIT% = 270
- CONST DLG_PROGRAMGROUP% = 280
- CONST DLG_SELECTGROUP% = 290
- CONST DLG_INVALIDPATH% = 310
- CONST DLG_INVALIDDRIVE% = 320
- CONST DLG_NEEDDOSV50% = 330
- CONST DLG_CDROMDRIVE% = 350
- CONST DLG_SKIPFRAMESDISABLED% = 440
- CONST DLG_SETUPDONE% = 450
- CONST DLG_RECOMMEND640X480% = 460
- CONST DLG_NEEDWAVE% = 500
- CONST DLG_CALLERROR% = 510
- CONST DLG_DIRNOTWRITABLE% = 590
- CONST DLG_NEWGROUP% = 680
- CONST DLG_NEED640X480% = 780
- CONST DLG_NEED256COLOR% = 800
- CONST DLG_DEFVIDNOTWINDOW% = 830
-
- ''Error return values for GetSoundCardInfo()
- CONST GSCI_SUCCESS% = 0
-
- ''Bitmap ID
- CONST DEMOLOGO% = 1
-
- ''Misc constants
- CONST VALIDCHAR$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"
- CONST CUIDLL$ = "vminst.dll"
- CONST EMPTY$ = ""
- CONST DEFINSTPATH$ = "C:\VGDEMO\"
- CONST VGD$ = "Virtual Guitar Demo"
- CONST FALSE% = 0
- CONST TRUE% = -1
- CONST YES$ = "Yes"
- CONST NO$ = "No"
- CONST UYES$ = "YES"
- CONST UNO$ = "NO"
-
- ''Dialog box routines
- CONST INFODLG$ = "FInfoDlgProc"
- CONST EDITDLG$ = "FEditDlgProc"
- CONST TEXTDLG$ = "FTwoTextDlgProc"
- CONST LISTDLG$ = "FListDlgProc"
-
- ''Dialog box answer strings
- CONST DSTOP$ = "STOP"
- CONST CONTINUE$ = "CONTINUE"
- CONST CHANGE$ = "CHANGE"
- CONST CREATE$ = "CREATE"
- CONST DESTROY$ = "DESTROY"
- CONST TRYAGAIN$ = "TRYAGAIN"
-
- ''Sections in VMUSIC.INI
- CONST DEVICES$ = "Devices"
- CONST VMSB$ = "VMSB"
- CONST INSTALLATION$ = "Installation"
- CONST VMSERIAL$ = "VMSerial"
- CONST VGDEMO$ = "VGDEMO"
- CONST GUITAR$ = "Guitar"
- CONST VMMSND$ = "VMMSND"
-
- ''Internal functions
- DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
- DECLARE FUNCTION CreatePath (szPath$) AS INTEGER
- DECLARE FUNCTION VerifyPath (szPath$) AS INTEGER
- DECLARE FUNCTION VerifyDrive(szDrv$) AS INTEGER
-
- ''Subroutines
- DECLARE SUB DoSystemTests
- DECLARE SUB GetCDDrive
- DECLARE SUB GetInstallPath
- DECLARE SUB CheckWaveDevice
- DECLARE SUB UpdateWININI
- DECLARE SUB CheckVFW11
- DECLARE SUB UpdateVMGroup
- DECLARE SUB AskQuit
- DECLARE SUB UpdateCDPath
- DECLARE SUB UpdateInstallPath
- DECLARE SUB InstallVMIcons
-
- ''Global variables - needed because they are used across SUBs
- GLOBAL InstPath$, VMusicIniPath$
- GLOBAL CDDrv$, CDRoot$, HDDrv$
- GLOBAL Group$, VidTestFile$
- GLOBAL WinIniUpd%, SystemIniUpd%, VMMSNDInstall%, EnableSkipFrames%
-
- ''<><><><><><><> M A I N P R O G R A M <><><><><><><><>
-
- INIT:
- SetBitmap CUIDLL$, DEMOLOGO%
- SetTitle "Virtual Guitar Demo Installation"
- SetAbout "Virtual Guitar Demo", "Copyright 1994 Ahead, Inc."
-
- Tmp$ = GetSymbolValue("STF_SRCINFPATH")
- IF Tmp$ = EMPTY$ THEN
- Tmp$ = GetSymbolValue("STF_CWDDIR") + "VGDEMO.INF"
- END IF
- ReadInfFile Tmp$
-
- WinDir$ = GetWindowsDir()
- VMusicIniPath$ = MakePath(WinDir$, "VMUSIC.INI")
-
- InstPath$ = DEFINSTPATH$
-
- ''See if it's already installed
- CHKREINST:
- IF DoesIniSectionExist(VMusicIniPath$, VGDEMO$) THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_ALREADYINSTALLED%, INFODLG$, 0, EMPTY$)
- IF Tmp$ = DSTOP$ THEN
- AskQuit
- GOTO CHKREINST
- ELSE
- UIPop 1
- END IF
- END IF
-
- ''*******************************************************
- ''** I N S T A L L o r R E I N S T A L L **
- ''*******************************************************
-
- WELCOME:
- Tmp$ = UIStartDlg(CUIDLL$, DLG_WELCOME%, INFODLG$, 0, EMPTY$)
- IF Tmp$ = CONTINUE$ THEN
- UIPop 1
- ELSE
- AskQuit
- GOTO WELCOME
- END IF
-
- ''Get the CD drive letter and make sure it's wholesome and clean
- GetCDDrive
-
- ''See if VfW V1.1 is installed. If not, we don't come back.
- CheckVFW11
-
- ''Get the installation path and make sure it's kosher.
- GetInstallPath
-
- ''See if there's a Wave device
- CheckWaveDevice
-
- ''Do System Suitability Tests
- DoSystemTests
-
- ''Now, do the actual installation!
- IF CreatPath% THEN
- I% = CreatePath(InstPath$)
- END IF
-
- ClearCopyList
- AddSectionFilesToCopyList VGDEMO$, CDRoot$, InstPath$
- AddSectionFilesToCopyList "Win", CDRoot$, WinDir$
-
- CopyFilesInCopyList
-
- ''Update VMUSIC.INI
- UpdateCDPath
- UpdateInstallPath
-
- ''Update WIN.INI
- UpdateWININI
-
- ''Create or update a Program Manager group with our stuff
- InstallVMIcons
-
- DONE:
- Tmp$ = "To run the Demo, exit from the Super Pac shell and "
- Tmp$ = Tmp$ + "select the Virtual Guitar Demo icon in the "
- Tmp$ = Tmp$ + Group$ + " group."
-
- SetSymbolValue "Text1In", Tmp$
- SetSymbolValue "Text2In", EMPTY$
-
- Tmp$ = UIStartDlg(CUIDLL$, DLG_SETUPDONE%, TEXTDLG$, 0, EMPTY$)
- END
-
- QUIT: ''I don't know why this has to be here, but it does!
- END
-
-
- '**
- '** Purpose:
- '** Appends a file name to the end of a directory path,
- '** inserting a backslash character as needed.
- '** Arguments:
- '** szDir$ - full directory path (with optional ending "\")
- '** szFile$ - filename to append to directory
- '** Returns:
- '** Resulting fully qualified path name.
- '*************************************************************************
- FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
- IF szDir$ = EMPTY$ THEN
- MakePath = szFile$
- ELSEIF szFile$ = EMPTY$ THEN
- MakePath = szDir$
- ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
- MakePath = szDir$ + szFile$
- ELSE
- MakePath = szDir$ + "\" + szFile$
- END IF
- END FUNCTION
-
-
-
- '** FUNCTION CreatePath
- '**
- '** Purpose:
- '** Creates a user-supplied path.
- '** Argument:
- '** szPath$ - the path to be created. If it has multiple subdirectories,
- '** all of them will be created in order. NOTE: This function assumes
- '** that the character set and syntax of the pathname have already been
- '** validated.
- '** Returns:
- '** Always returns 0.
- '*************************************************************************
- FUNCTION CreatePath (szPath$) STATIC AS INTEGER
-
- '' Put on a trailing "\" if there's not one already
- IF MID$(szPath$, LEN(szPath$), 1) <> "\" THEN
- szPath$ = szPath$ + "\"
- END IF
-
- '' Start the search after the "<drive>:\"
- S% = 4
- I% = INSTR(S%, szPath$, "\")
-
- '' Plow through the list, creating the directories
- WHILE I%
- CreateDir MID$(szPath$, 1, I% - 1), cmoVital
- S% = I% + 1
- I% = INSTR(S%, szPath$, "\")
- WEND
-
- CreatePath = 0 '' Success
-
- END FUNCTION
-
-
-
- '** FUNCTION VerifyPath
- '**
- '** Purpose:
- '** Checks a user-supplied path name for correct format and valid
- '** characters.
- '** Argument:
- '** szPath$ - the path name to be checked
- '** Returns:
- '** 0 = path name was OK
- '** 1 = no or invalid drive letter
- '** 2 = no ":\" following drive letter
- '** 3 = invalid character in path name
- '** 4 = a directory name was too long or null
- '*************************************************************************
- FUNCTION VerifyPath (szPath$) STATIC AS INTEGER
-
- '' Assume no errors to start with.
- VerifyPath = 0
-
- ''Make sure it's the proper length
- IF LEN(szPath$) < 3 THEN
- VerifyPath = 4
- EXIT FUNCTION
- END IF
-
- '' See if the drive letter is valid
- IF VerifyDrive(MID$(szPath$, 1, 1)) THEN
- VerifyPath = 1
- EXIT FUNCTION
- END IF
-
- '' After the drive letter should come ":\"
- IF MID$(szPath$, 2, 2) <> ":\" THEN
- VerifyPath = 2
- EXIT FUNCTION
- END IF
-
- L% = LEN(szPath$)
- C% = 0
-
- FOR I% = 4 TO L%
- T$ = MID$(szPath$, I%, 1)
-
- IF INSTR(1, VALIDCHAR$, T$) = 0 THEN
- VerifyPath = 3
- EXIT FOR
- END IF
-
- IF T$ = "\" THEN
- IF C% = 0 THEN
- VerifyPath = 4
- EXIT FOR
- ELSE
- C% = 0
- END IF
- ELSE
- C% = C% + 1
- IF C% > 8 THEN
- VerifyPath = 4
- EXIT FOR
- END IF
- END IF
-
- NEXT I%
-
- END FUNCTION
-
-
- '** FUNCTION VerifyDrive
- '**
- '** Purpose:
- '** Checks a user-supplied drive name to see if it is valid and
- '** exists on this system
- '** Argument:
- '** szDrv$ - the path name to be checked
- '** Returns:
- '** 0 = drive name was OK
- '** 1 = drive name was invalid
- '** 2 = drive does not exist on this system
- '*************************************************************************
- FUNCTION VerifyDrive (szDrv$) STATIC AS INTEGER
-
- IF LEN(szDrv$) = 1 THEN
- C% = ASC(szDrv$)
- IF C% >= ASC("A") AND C% <= ASC("Z") THEN
- IF IsDriveValid(CHR$(C%)) THEN
- VerifyDrive = 0
- ELSE
- VerifyDrive = 2
- END IF
- ELSE
- VerifyDrive = 1
- END IF
- ELSE
- VerifyDrive = 1
- END IF
-
- END FUNCTION
-
- ''**
- ''** SUB DoSystemTests
- ''** Performs System Suitability testing
- ''**
- ''** Here, we test to make sure their system is adequate for the task.
- ''** In general, our attitude is that if we find something wrong, we let
- ''** the user know about it, but do not prevent him/her from installing.
- ''**
- ''** We require the following:
- ''** 486 25 MHz or faster processor
- ''** 4 MB of RAM
- ''** 5 MB of available disk space
- ''** MS Windows V3.1 or later, running in Enhanced mode
- ''** MS DOS V5.0 or later
- ''**
- ''** Global inputs:
- ''** HDDrv$
- ''** VidTestFile$
- ''**
- ''** Global outputs:
- ''** CPUType%
- ''** SysMemSize&
- ''** EnableSkipFrames%
- ''**
- STATIC SUB DoSystemTests
-
- '' Check for MS-DOS V5.0 or later
- SYSTST2:
- IF GetDOSMajorVersion() < 5 THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_NEEDDOSV50%, INFODLG$, 0, EMPTY$)
- END
- END IF
-
- '' Check for MS Windows V3.1 or later, running in Enhanced mode
- SYSTST3:
- MajVer% = GetWindowsMajorVersion()
- MinVer% = GetWindowsMinorVersion()
-
- IF MajVer% < 3 OR (MajVer% = 3 AND MinVer% < 10) THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_NEEDWIN31%, INFODLG$, 0, EMPTY$)
- END
- END IF
-
- SYSTST4:
- IF GetWindowsMode() <> 2 THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_NEEDENHANCED%, INFODLG$, 0, EMPTY$)
- END
- END IF
-
- '' Check for a 486 or later processor (we don't check the speed).
- SYSTST5:
- CPUType% = GetProcessorType()
- IF CPUType% < 4 THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_NEED486%, INFODLG$, 0, EMPTY$)
- END
- END IF
-
- '' Check for RAM and disk space
- SYSTST6:
- SysMemSize& = GetSystemMemSize()
-
- IF SysMemSize& < 3172 THEN ''3172 is (3 * 1024K) + 640K
- Tmp$ = UIStartDlg(CUIDLL$, DLG_NEED4MEG%, INFODLG$, 0, EMPTY$)
- END
- END IF
-
- SYSTST7:
- IF GetFreeSpaceForDrive(HDDrv$) < (5 * 1048576) THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_NEED5MBDISKSPACE%, INFODLG$, 0, EMPTY$)
- END
- END IF
-
- '' See if "SkipFrames" is enabled
- SYSTST10:
- Tmp$ = GetIniKeyString("WIN.INI", "MCIAVI", "SkipFrames")
- IF Tmp$ = "0" THEN ''If =1, or if not present, SkipFrames is enabled
- Tmp$ = UIStartDlg(CUIDLL$, DLG_SKIPFRAMESDISABLED%, INFODLG$, 0, EMPTY$)
- IF Tmp$ = CONTINUE$ THEN
- EnableSkipFrames% = 0
- UIPop 1
- ELSEIF Tmp$ = CHANGE$ THEN
- EnableSkipFrames% = -1
- UIPop 1
- ELSE
- AskQuit
- GOTO SYSTST10
- END IF
- END IF
-
- '' See if "DefaultVideo" is set to "Window". Unlike our other changes,
- '' this one is necessary for the installation to run and so must be
- '' done here and now.
- ''
- IF DoesIniKeyExist("WIN.INI", "MCIAVI", "DefaultVideo") THEN
- Tmp$ = GetIniKeyString("WIN.INI", "MCIAVI", "DefaultVideo")
- IF UCASE$(Tmp$) <> "WINDOW" THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_DEFVIDNOTWINDOW%, INFODLG$, 0, EMPTY$)
- IF Tmp$ = CHANGE$ THEN
- UIPop 1
- CreateIniKeyValue "WIN.INI", "MCIAVI", "DefaultVideo", "Window", cmoOverwrite
- ELSE
- END
- END IF
- END IF
- END IF
-
- '' Check for 640x480 display
- SYSTST12:
- I% = GetScreenWidth()
- I1% = GetScreenHeight()
-
- IF (I% < 640) OR (I1% < 480) THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_NEED640X480%, INFODLG$, 0, EMPTY$)
- END
- END IF
-
- IF (I% <> 640) OR (I1% <> 480) THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_RECOMMEND640X480%, INFODLG$, 0, EMPTY$)
- UIPop 1
- END IF
-
- '' Check for 256-color display
- SYSTST13:
- I% = GetDisplayColorBits(HwndFrame())
-
- IF I% < 8 THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_NEED256COLOR%, INFODLG$, 0, EMPTY$)
- END
- END IF
-
- END SUB
-
-
- ''**
- ''** SUB GetCDDrive
- ''** Gets drive letter for CD-ROM and verifies that the CD-ROM in the
- ''** drive is the correct CD.
- ''**
- ''** At present, we don't to anything to validate that the given drive
- ''** is really a CD-ROM.
- ''**
- ''** Global inputs:
- ''** None
- ''**
- ''** Global outputs:
- ''** CDDrv$
- ''** CDRoot$
- ''** VidTestFile$
- ''**
- STATIC SUB GetCDDrive
-
- SetSymbolValue "EditTextIn", MID$(GetSymbolValue("STF_SRCDIR"), 1, 1)
- SetSymbolValue "EditLimit", "1"
- SetSymbolValue "EditFocus", "END"
-
- GETCD1:
- Tmp$ = UIStartDlg(CUIDLL$, DLG_CDROMDRIVE%, EDITDLG$, 0, EMPTY$)
- CDDrv$ = GetSymbolValue("EditTextOut")
-
- '' Convert to upper case.
- CDDrv$ = UCASE$(CDDrv$)
-
- IF Tmp$ = CONTINUE$ THEN
- UIPop 1
- ELSE
- AskQuit
- GOTO GETCD1
- END IF
-
- IF VerifyDrive(CDDrv$) THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_INVALIDDRIVE%, INFODLG$, 0, EMPTY$)
- UIPop 1
- IF Tmp$ = TRYAGAIN$ THEN
- GOTO GETCD1
- ELSE
- AskQuit
- GOTO GETCD1
- END IF
- END IF
-
- CDRoot$ = CDDrv$ + MID$(GetSymbolValue("STF_SRCDIR"), 2)
-
- VidTestFile$ = MakePath(CDRoot$, "AEROINTR.AVI")
-
- END SUB
-
- ''**
- ''** SUB GetInstallPath
- ''** Gets installation path from user, verifies it for correctness,
- ''** and sets CreatPath% if it needs to be created.
- ''**
- ''** Global inputs:
- ''** DEFINSTPATH$
- ''**
- ''** Global outputs:
- ''** InstPath$
- ''** HDDrv$
- ''** CreatPath%
- ''**
- STATIC SUB GetInstallPath
-
- SetSymbolValue "EditTextIn", DEFINSTPATH$
- SetSymbolValue "EditLimit", ""
- SetSymbolValue "EditFocus", "END"
-
- CreatPath% = 0
-
- GETPATH1:
- Tmp$ = UIStartDlg(CUIDLL$, DLG_INSTPATH%, EDITDLG$, 0, EMPTY$)
- InstPath$ = GetSymbolValue("EditTextOut")
-
- IF Tmp$ = CONTINUE$ THEN
- UIPop 1
- ELSE
- AskQuit
- GOTO GETPATH1
- END IF
-
- ''Clean up installation path and put "\" on the end if it's not there
- '' already.
- InstPath$ = UCASE$(InstPath$)
- I% = LEN(InstPath$)
- IF I% THEN ''Necessary because MID$() causes crash if InstPath$ is null!
- IF MID$(InstPath$, I%, 1) <> "\" THEN
- InstPath$ = InstPath$ + "\"
- END IF
- END IF
-
- GETPATH2:
- I% = VerifyPath(InstPath$)
- IF I% THEN
- IF I% = 1 THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_INVALIDDRIVE%, INFODLG$, 0, EMPTY$)
- IF Tmp$ = TRYAGAIN$ THEN
- UIPop 1
- GOTO GETPATH1
- ELSE
- AskQuit
- GOTO GETPATH2
- END IF
- ELSE
- Tmp$ = UIStartDlg(CUIDLL$, DLG_INVALIDPATH%, INFODLG$, 0, EMPTY$)
- IF Tmp$ = TRYAGAIN$ THEN
- UIPop 1
- GOTO GETPATH1
- ELSE
- AskQuit
- GOTO GETPATH2
- END IF
- END IF
- END IF
-
- GETPATH3:
- IF InstPath$ = DEFINSTPATH$ THEN
- CreatPath% = -1
- ELSEIF DoesDirExist(InstPath$) = 0 THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_DIRNOTFOUND%, INFODLG$, 0, EMPTY$)
- IF Tmp$ = TRYAGAIN$ THEN
- UIPop 1
- GOTO GETPATH1
- ELSEIF Tmp$ = CREATE$ THEN
- UIPop 1
- CreatPath% = -1
- ELSE
- AskQuit
- GOTO GETPATH3
- END IF
- END IF
-
- GETPATH4:
- IF CreatPath% = 0 THEN
- IF IsDirWritable(InstPath$) = 0 THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_DIRNOTWRITABLE%, INFODLG$, 0, EMPTY$)
- IF Tmp$ = TRYAGAIN$ THEN
- UIPop 1
- GOTO GETPATH1
- ELSE
- AskQuit
- GOTO GETPATH4
- END IF
- END IF
- END IF
-
- HDDrv$ = MID$(InstPath$, 1, 1) ''Get installation drive letter
-
- END SUB
-
-
- ''**
- ''** SUB CheckWaveDevice
- ''** Tests to see if there is a Wave device available on this system.
- ''**
- ''** Global inputs:
- ''** None
- ''**
- ''** Global outputs:
- ''** None
- ''**
- STATIC SUB CheckWaveDevice
- IF GetSoundCardInfo() <> GSCI_SUCCESS% THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_NEEDWAVE%, INFODLG$, 0, EMPTY$)
- END
- END IF
-
- END SUB
-
- ''**
- ''** SUB UpdateWININI
- ''** Updates WIN.INI if there's anything to update
- ''**
- ''** Global inputs:
- ''** EnableSkipFrames%
- ''**
- ''** Global outputs:
- ''** WinIniUpd%
- ''**
- STATIC SUB UpdateWININI
-
- WinIniUpd% = FALSE%
-
- IF EnableSkipFrames% THEN
- CreateIniKeyValue "WIN.INI", "MCIAVI", "SkipFrames", "1", cmoOverwrite
- WinIniUpd% = TRUE%
- END IF
-
- END SUB
-
- ''**
- ''** SUB CheckVFW11
- ''** Tests to see if Video for Windows V1.1 is installed on the system.
- ''** If so, we return. If not, we exit from the installation.
- ''**
- ''** Global inputs:
- ''** None
- ''**
- ''** Global outputs:
- ''** None
- ''**
- STATIC SUB CheckVFW11
-
- IF GetVFWVersion(HwndFrame(), VidTestFile$) = 0 THEN
- Tmp$ = UIStartDlg(CUIDLL$, DLG_NEEDVFW11%, INFODLG$, 0, EMPTY$)
- END
- END IF
-
- END SUB
-
- ''**
- ''** SUB UpdateVMGroup
- ''** Updates the VM items in the specified group, and updates the
- ''** VMUSIC.INI "Group" entry
- ''**
- ''** Global inputs:
- ''** VMusicIniPath$
- ''** Group$
- ''** InstPath$
- ''** CDRoot$
- ''**
- ''** Global outputs:
- ''** None
- ''**
- STATIC SUB UpdateVMGroup
-
- VMusicPath$ = InstPath$ + "VMUSIC.EXE " + CDRoot$ + " " + InstPath$
-
- CreateProgmanItem Group$, "Virtual Guitar Demo", VMusicPath$ + "LIFEDEMO.GSQ", EMPTY$, cmoOverwrite
-
- CreateIniKeyValue VMusicIniPath$, VGDEMO$, "Group", Group$, cmoOverwrite
-
- END SUB
-
- ''**
- ''** SUB AskQuit
- ''** See if the user really wants to exit. If so, do it.
- ''**
- ''** Global inputs:
- ''** None
- ''**
- ''** Global outputs:
- ''** None
- ''**
- STATIC SUB AskQuit
-
- Tmp$ = UIStartDlg(CUIDLL$, DLG_REALLYEXIT%, "FQuitDlgProc", 0, EMPTY$)
- IF Tmp$ = CONTINUE$ THEN
- UIPop 1
- ELSE
- UIPopAll
- END
- END IF
-
- END SUB
-
- ''**
- ''** SUB UpdateCDPath
- ''** Updates VMUSIC.INI CDPath entry
- ''**
- ''** Global inputs:
- ''** VMusicIniPath$
- ''** CDRoot$
- ''**
- ''** Global outputs:
- ''** None
- ''**
- STATIC SUB UpdateCDPath
-
- CreateIniKeyValue VMusicIniPath$, VGDEMO$, "CDPath", CDRoot$, cmoOverwrite
-
- END SUB
-
- ''**
- ''** SUB UpdateInstallPath
- ''** Updates VMUSIC.INI Path entry
- ''**
- ''** Global inputs:
- ''** VMusicIniPath$
- ''** InstPath$
- ''**
- ''** Global outputs:
- ''** None
- ''**
- STATIC SUB UpdateInstallPath
-
- CreateIniKeyValue VMusicIniPath$, VGDEMO$, "Path", InstPath$, cmoOverwrite
-
- END SUB
-
- ''**
- ''** SUB InstallVMIcons
- ''** Asks the user whether to create a new Virtual Music group or
- ''** install into some other group. If user selects "some other
- ''** group", a listbox is presented and the user can choose.
- ''**
- ''** Note that if GetProgmanGroupList() returns an error, we just
- ''** punt and create a Virtual Music group.
- ''**
- ''** Global inputs:
- ''** InstPath$
- ''** CDRoot$
- ''**
- ''** Global outputs:
- ''** None
- ''**
- STATIC SUB InstallVMIcons
-
- IF GetProgmanGroupList() THEN
- Group$ = VGD$
- CreateProgmanGroup Group$, EMPTY$, cmoVital
- ELSE
- Tmp$ = UIStartDlg(CUIDLL$, DLG_PROGRAMGROUP%, INFODLG$, 0, EMPTY$)
- UIPop 1
- IF Tmp$ = CREATE$ THEN
- SetSymbolValue "EditTextIn", VGD$
- SetSymbolValue "EditLimit", "24"
- SetSymbolValue "EditFocus", "END"
-
- Tmp$ = UIStartDlg(CUIDLL$, DLG_NEWGROUP%, EDITDLG$, 0, EMPTY$)
- UIPop 1
-
- Group$ = GetSymbolValue("EditTextOut")
-
- IF Group$ = "" THEN
- Group$ = VGD$
- END IF
-
- CreateProgmanGroup Group$, EMPTY$, cmoVital
- ELSE
- SetSymbolValue "ListItemsOut", VGD$
-
- Tmp$ = UIStartDlg(CUIDLL$, DLG_SELECTGROUP%, LISTDLG$, 0, EMPTY$)
- UIPop 1
-
- Group$ = GetSymbolValue("ListItemsOut")
-
- IF Group$ = "" THEN
- Group$ = VGD$
- CreateProgmanGroup Group$, EMPTY$, cmoVital
- END IF
-
- END IF
-
- END IF
-
- UpdateVMGroup
-
- END SUB
-
-